from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from projectadmin.event.models import *

urlpatterns = \
    patterns('',

    url(r'^$', direct_to_template, {"template": "event/home.html"}, name="event_home"),
    
    url(r'^add/$', 'event.views.event_form', name="event_add"),
    
    url(r'^list/$', 'django.views.generic.list_detail.object_list', {'queryset' : Event.objects.all(), }, name="event_event_list"),
    url(r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', {'queryset' : Event.objects.all(), }, name="event_event_detail"),

    url(r'^track/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', {'queryset' : Track.objects.all(), }, name="event_track_detail"),

    url(r'^session/add/$', 'event.views.session_form', name="event_session_add"),
    url(r'^session/list/$', 'django.views.generic.list_detail.object_list', {'queryset' : Session.objects.all(), }, name="event_session_list"),
    url(r'^session/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', {'queryset' : Session.objects.all(), }, name="event_session_detail"),
    url(r'^session/(?P<session_id>\d+)/edit$', 'event.views.session_form', name="event_session_edit"),

    url(r'^sessionType/list/$', 'django.views.generic.list_detail.object_list', {'queryset' : SessionType.objects.all(), }, name="event_sessionType_list"),
    url(r'^sessionType/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', {'queryset' : SessionType.objects.all(), }, name="event_sessionType_detail"),

    url(r'^venue/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', {'queryset' : Venue.objects.all(), }, name="event_venue_detail"),
    )

